package router

import (
	"we-account-api/controller"

	"github.com/gin-gonic/gin"
)

func Register(r *gin.Engine) {
	api := r.Group("/api")
	{
		// 用户相关路由
		user := api.Group("/user")
		{
			user.POST("/register", controller.User.Register)
			user.POST("/login", controller.User.Login)
			user.GET("/info", controller.User.GetUserInfo)
			user.GET("/list", controller.User.GetUserList)
		}
		// 微信小程序接口
		wechat := api.Group("/wechat")
		{
			wechat.POST("/login", controller.Wechat.Login)
		}
	}

	// userGroup := api.Group("/user")
	// userGroup := api.Group("/user")
	// userGroup.Use(middleware.Auth())
	// {
	// 	userGroup.GET("/list", controller.User.GetUserList)
	// }
}
